<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link rel="stylesheet" href="../lib/OSL/layui/css/layui.css">
    <link rel="stylesheet" href="../lib/fonts/icomoon/style.css">
    <link rel="stylesheet" href="../lib/css/page/users_manage.css">
</head>

<body>
    <!-- 卡片区域 -->
    <div class="layui-card">
        <div class="layui-card-header">
            <span>在线报修</span>
        </div>

        <div class="layui-card-body">

            <!-- //数据区 -->
            <table class="layui-table">
                <colgroup>
                    <col />
                    <col />
                    <col />
                    <col />
                    <col />
                    <col />
                    <col />
                    <col />
                    <col />
                    <col />
                    <col />
                </colgroup>
                <thead>
                    <tr>
                        <th>姓名</th>
                        <th>学号</th>
                        <th>学院</th>
                        <th>班级</th>
                        <th>手机号码</th>
                        <th>楼栋名称</th>
                        <th>宿舍名称</th>
                        <th>入住时间</th>
                        <td>床铺维修状态</td>
                        <td>操作</td>
                    </tr>
                </thead>
                <tbody>

                </tbody>
            </table>
            <!-- //分页区域 -->
            <div id="pageBox"></div>
        </div>

        <div class="repair-container">
            <h3 class="repair-title">报修类型说明</h3>
            
            <div class="repair-category">
                <span class="category-title">1. 水电类</span>
                <div class="tag-list">
                    <span class="tag">水龙头漏水</span>
                    <span class="tag">水管破裂或漏水</span>
                    <span class="tag">电灯不亮或闪烁</span>
                    <span class="tag">插座失灵</span>
                    <span class="tag">停电问题</span>
                </div>
            </div>
        
            <div class="repair-category">
                <span class="category-title">2. 五金类</span>
                <div class="tag-list">
                    <span class="tag">门锁卡顿或损坏</span>
                    <span class="tag">窗户损坏</span>
                    <span class="tag">床、桌椅损坏</span>
                </div>
            </div>
        
            <div class="repair-category">
                <span class="category-title">3. 墙面和地面</span>
                <div class="tag-list">
                    <span class="tag">墙面裂缝或脱落</span>
                    <span class="tag">地面瓷砖损坏</span>
                </div>
            </div>
        
            <div class="repair-category">
                <span class="category-title">4. 卫生设施</span>
                <div class="tag-list">
                    <span class="tag">厕所堵塞</span>
                    <span class="tag">洗手台损坏</span>
                    <span class="tag">下水道堵塞</span>
                </div>
            </div>
        
            <div class="repair-category">
                <span class="category-title">5. 电器类</span>
                <div class="tag-list">
                    <span class="tag">空调故障</span>
                    <span class="tag">风扇故障</span>
                    <span class="tag">热水器故障</span>
                </div>
            </div>
        
            <div class="repair-category">
                <span class="category-title">6. 网络类</span>
                <div class="tag-list">
                    <span class="tag">网络插口故障</span>
                    <span class="tag">网络连接问题</span>
                </div>
            </div>
        
            <div class="repair-category">
                <span class="category-title">7. 其他</span>
                <div class="tag-list">
                    <span class="tag">洗浴热水系统故障</span>
                    <span class="tag">公共区域设施损坏</span>
                    <span class="tag">天花板漏水</span>
                </div>
            </div>
        </div>
    </div>

    <script src="../lib/OSL/jquery.js"></script>
    <script type="text/javascript" src="../lib/OSL/layui/layui.all.js"></script>
    <script src="../lib/js/baseAPI.js"></script>
    <script src="../lib/js/page/fix_stu.js"></script>
    <script src="../lib/OSL/template-web.js"></script>

    <!-- 获取所有用户数据的表格模板 -->
    <script type="text/html" id="tpl-table">
        {{each data}}
        <tr>
            <td>{{$value.username}}</td>
            <td>{{$value.sno}}</td>
            <td>{{$value.college}}</td>
            <td>{{$value.aclass}}</td>
            <td>{{$value.phone_number}}</td>
            <td>{{$value.floor}}</td>
            <td>{{$value.hostel}}</td>
            <td>{{$value.start_time}}</td>
            {{if $value.fix_flag ==1}}
            <td><button type="button" class="layui-btn layui-btn-xs" disabled="true"
                    style="cursor:default;background-color: #ff006e">维修中</button>
            </td>
            {{else}}
            <td><button type="button" class="layui-btn layui-btn-primary layui-btn-xs" disabled="true"
                    style="cursor:default">正常</button>
            </td>
            {{/if}}
            <th>
                <button type="button" class="layui-btn layui-btn-sm btn_editLab" data_id="{{$value.id}}">报修</button>
            </th>
        </tr>
        {{/each}}
    </script>



      <!-- 根据id修改信息 -->
    <script type="text/html" id="dialog_editLab">
        <form class="layui-form" id="form_editLab" lay-filter="form_edit">
            <div class="layui-form-item">
                <label class="layui-form-label">报修类型</label>
                <div class="layui-input-block">
                    <input type="radio" name="type_fix" value="1" title="水电类">
                    <input type="radio" name="type_fix" value="2" title="五金类">
                    <input type="radio" name="type_fix" value="3" title="墙面和地面">
                    <input type="radio" name="type_fix" value="4" title="卫生设施">
                    <input type="radio" name="type_fix" value="5" title="其他">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">报修原因</label>
                <div class="layui-input-block">
                    <textarea type="text" name="content" lay-verify="required" placeholder="请输入报修原因"
                        autocomplete="off" class="layui-textarea"> </textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">上传图片</label>
                <div class="layui-input-block">
                    <input type="file" name="picture"  placeholder="请上传图片"
                        autocomplete="off" class="layui-input" accept="image/png,image/jpeg,image/gif">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">确认</button>
                </div>
            </div>
        </form>
    </script>

</body>

</html>